<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>字符串反转</title>
</head>
<body>
<script>
    var str = 'abc'
    // split()将其分割成子字符串数组,join()把数组拼接成字符串
    res = str.split('').reverse().join('')
    console.log(res)
</script>
</body>
</html>
